//函数重载，需要用到很多函数，引出模板
#include<iostream>
using namespace std;
int swap1(int& a, int &b)
{
    int tmp = a;
    a = b;
    b = tmp;
}
float swap1(float& a, float &b)
{
    float tmp = a;
    a = b;
    b = tmp;
}
double swap1(double& a, double&b)
{
    double tmp = a;
    a = b;
    b = tmp;
}
char swap1(char& a, char&b)
{
    char tmp = a;
    a = b;
    b = tmp;
}
int main(void)
{
    int a = 3, b = 4;
    swap1(a,b);
    cout << "a = " << a << " b = " << b << endl;
    float c = 3.14, d = 4.13;
    swap1(c,d);
    cout <<"c = " << c << " d = " << d << endl;
    return 0;
}